// api.js数据接口
// import axios from 'axios'
import {request} from '../utils/request'
// 数据库列表检索
export function listDatabase (self, query) {
    console.log(query)
	return request(self, {
        url: '/database_listDatabase',
        headers: { 'requestType': 'json' },
        method: 'POST',
        data: query
    })
}
// 新增数据库
export function addDatabase (self, query) {
    console.log(query)
	return request(self, {
        url: '/database_addDatabase',
        headers: { 'requestType': 'json' },
        method: 'POST',
        data: query
    })
}
// 删除
export function deleteDatabase (self, query) {
    console.log(query)
    return request(self, {
        url: '/database_deleteDatabase',
        headers: { 'requestType': 'json' },
        method: 'POST',
        data: query
    })
}
// 保存
export function saveDatabase (self, query) {
    console.log(query)
    return request(self, {
        url: '/database_saveDatabase',
        headers: { 'requestType': 'json' },
        method: 'POST',
        data: query
    })
}
// 查询
export function getDatabase (self, query) {
    console.log(query)
    return request(self, {
        url: '/database_getDatabase',
        headers: { 'requestType': 'json' },
        method: 'POST',
        data: query
    })
}
// 授权
export function authDatabase (self, query) {
    console.log(query)
    return request(self, {
        url: '/database_authDatabase',
        headers: { 'requestType': 'json' },
        method: 'POST',
        data: query
    })
}
// 授权查询
export function authQuery (self, query) {
    console.log(query)
    return request(self, {
        url: '/database_authQuery',
        headers: { 'requestType': 'json' },
        method: 'POST',
        data: query
    })
}
